package com.sam.im.heiqun.uis.adapters.holder;

import android.support.v7.widget.RecyclerView;
import android.view.View;
import android.widget.TextView;

import com.sam.im.heiqun.R;
import com.sam.im.heiqun.uis.adapters.SectionalizationManagerAdpter;

/**
 * Created by Joe on 2016/12/20.
 */

public class SectionalizationManagerHolder extends RecyclerView.ViewHolder implements View.OnClickListener {
    public final View mView;
    public final TextView group_name;
    public final TextView delete;
    private SectionalizationManagerAdpter.SectionalizationManagerListClickListener mSectionalizationManagerListClickListener;

    public SectionalizationManagerHolder(View view, SectionalizationManagerAdpter.SectionalizationManagerListClickListener sectionalizationManagerListClickListener) {
        super(view);
        mView = view;
        this.mSectionalizationManagerListClickListener =sectionalizationManagerListClickListener;
        group_name = (TextView) view.findViewById(R.id.group_name);
        delete = (TextView) view.findViewById(R.id.delete);

        delete.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        if (mSectionalizationManagerListClickListener!=null)
        {
            mSectionalizationManagerListClickListener.onDeleteGroupClick(v,getAdapterPosition());
        }
    }
}